<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
        <!-- 属性绑定，单向绑定 -->
        <a v-bind:href="url">网址</a>
        <button @click='change'>切换</button>
    </div>
    <script src="../node_modules/vue/dist/vue.min.js"></script>
    <script>
        var vm = new Vue({
            el: '#app',
            data: {
                url:'http://www.baidu.com'
            },
            methods: {
                change: function () {
                    this.url = 'http://www.hao123.com';
                },
                
            }
        })
    </script>
</body>
</html>